home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
workbench
/
waitval10
/
waitval.readme
< prev
next >
Wrap
Text File
|
1999-07-28
|
3KB
|
58 lines
Short: Waits for device to finish validating
Author: Pieter Hollants <fxmts205@rz.uni-frankfurt.de>
Uploader: Pieter Hollants <fxmts205@rz.uni-frankfurt.de>
Type: util/boot
WaitVal v1.0 (08.02.96) by Pieter Hollants
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This utility was written in five minutes because I was fed up with my
partitions validating all the time just because some program crashed the
computer again during a write access. You pass it a drive name (preferrably
your boot partition) and it checks if the drive is currently validating. If
so, it will check every 5 seconds until it has finished validating. Due
to its nature its meant to be used in your startup-sequence, preferrably
at its very start.
I've written this to suit my needs. It does not work when run from Workbench,
it does not use ReadArgs() to get the single argument needed, it does not
check multiple devices at once (who boots from multiple partitions at once
anyway?) and it does not give you a nice requester asking you to wait (it
especially refuses to deal with a MUI requester!). It just writes some info
to the shell and you'll have to hold on. It doesn't say anything if the
specified drive is fine. That's to prevent the Boot Shell from being opened.
The delay of 5 seconds seems accurate to me as you won't want the tool to
eat all CPU time by continously checking the drive's status. It's hardcoded,
you won't die of the few wasted seconds anyway.
And the huge size of 5k is because of the standard C startup code. I was
too lazy to write the whole thing without startup. Feel free to contact me
if you want to do it better and you'll get the C source. Also if you'd like
to be able to check multiple devices at once, to change the 5 seconds
delay or want a ReqTools requester popping up - this would be one of the
things I'd rather consider. For now I'm just happy as it currently is.
Another thing to notice are the return codes: if everything goes okay
it's a dumb zero, if the device can't be Lock()'d or Info()'d it'll be
ten and if you smart guy attempt to run it from Workbench it will be 20
as the current window ('*' to be precisely) couldn't be opened for
writing (I'm using Write() as the text appears immediately in contrast to
the buffered printf()).
Contact me at: Pieter Hollants INet: fxmts205@rz.uni-frankfurt.de
Rossertstrasse 80 Fido: Pieter Hollants@2:2465/425.14
D-65830 Kriftel Warp: fate@137:15/201.0
Germany CoCo: fate@99:112/1.0
Also known as Fate/1oo% CNet/Anscii Innovation. Greetings to Neurodancer,
Dreamer, Adolescent and the others :)
And by the way, this tool is freely usable. Distribution in commercial
software collections is strictly forbidden (except for the AmiNet and
Fred Fish CDs). Anyone charging money for it should consider joining
Microsoft(TM). And it's not shareware as that utility doing the same task
a bit better by some finish coder. It's free - it's so simple it must be
free. I rather like getting mails of satisfied users (huh huh) than money.
Amiga - where do you want to go tomorrow? (TM by phase 5)